home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWEvents / FWEvent.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  22.3 KB  |  705 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWEvent.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWEVENT_H
  11. #define FWEVENT_H
  12.  
  13. #ifndef FWODTYPS_H
  14. #include "FWODTyps.h"
  15. #endif
  16.  
  17. #ifndef FWSTDDEF_H
  18. #include "FWStdDef.h"
  19. #endif
  20.  
  21. #ifndef FWRUNTYP_H
  22. #include "FWRunTyp.h"
  23. #endif
  24.  
  25. #if defined(FW_BUILD_WIN)  && !defined(_INC_WINDOWS)
  26. #include <windows.h>
  27. #endif    
  28.  
  29. //========================================================================================
  30. // Forward class declarations
  31. //========================================================================================
  32.  
  33. class FW_CPoint;
  34. class ODFrame;
  35. class ODFacet;
  36. class FW_CEmbeddedMouseEvent;
  37. class FW_CMapping;
  38.  
  39. //========================================================================================
  40. //  Type definitions
  41. //========================================================================================
  42.  
  43. #ifdef FW_BUILD_MAC
  44. typedef long FW_PlatformEventTime;
  45. #endif
  46.  
  47. #ifdef FW_BUILD_WIN
  48. typedef DWORD FW_PlatformEventTime;
  49. #endif
  50.  
  51. //========================================================================================
  52. // CLASS FW_CSystemEvent
  53. //========================================================================================
  54. class FW_CSystemEvent
  55. {
  56. public:
  57.     static const short kEmpty;
  58.     static const short kExtend;        // Mac shift key, Windows shift key
  59.     static const short kItem;        // Mac command key, Windows control key        [HLX] ???
  60.     static const short kCopy;        // Mac option key, Windows control key        [HLX] ???
  61.     static const short kControl;    // Mac control key, Windows control key
  62.  
  63. public:
  64.  
  65.     virtual ~FW_CSystemEvent();
  66.     
  67.     ODEventData*                     GetPlatformEvent();
  68.     unsigned long                     GetMessage() const;
  69.     FW_PlatformEventTime             GetTime() const;
  70.     ODPlatformWindow                 GetPlatformWindow() const;
  71.  
  72.     // ----- Modifiers
  73.     unsigned long                     GetPlatformModifiers(Environment* ev) const;
  74.     unsigned short                    GetModifiers(Environment* ev) const;
  75.  
  76.     FW_Boolean                        IsExtendModifier(Environment* ev) const;            // Mac shift key, Windows shift key
  77.     FW_Boolean                        IsItemModifier(Environment* ev) const;                // Mac command key, Windows control key
  78.     FW_Boolean                        IsCopyModifier(Environment* ev) const;                // Mac option key, Windows control key        [HLX] ???
  79.     FW_Boolean                        IsControlKeyModifier(Environment* ev) const;        // Mac control key, Windows control key
  80.  
  81.     void                            ClearExtendModifier(Environment* ev);
  82.     void                            ClearItemModifier(Environment* ev);
  83.     void                            ClearCopyModifier(Environment* ev);
  84.     void                            ClearControlKeyModifier(Environment* ev);
  85.  
  86.     FW_Boolean                        IsPropagated(Environment* ev) const;
  87.     
  88. protected:
  89.     FW_CSystemEvent(Environment* ev, ODPlatformWindow theWindow, FW_PlatformEventTime time);
  90.     FW_CSystemEvent(Environment* ev, ODEventData* theEvent, FW_Boolean propagated);
  91.     
  92.     FW_CSystemEvent(Environment* ev, const FW_CSystemEvent& other);
  93.     
  94.     ODEventData         fEvent;
  95.     ODPlatformWindow    fPlatformWindow;
  96.     FW_Boolean            fPropagated;
  97. };
  98.  
  99. //========================================================================================
  100. // CLASS FW_CNullEvent
  101. //========================================================================================
  102.  
  103. class FW_CNullEvent : public FW_CSystemEvent
  104. {
  105. public:
  106.     
  107.     FW_CNullEvent(Environment* ev, ODEventData* theEvent, FW_Boolean propagated);
  108.     FW_CNullEvent(Environment* ev, ODPlatformWindow theWindow, FW_PlatformEventTime time);
  109.  
  110.     FW_CNullEvent(Environment* ev, const FW_CNullEvent& other);
  111.     virtual        ~FW_CNullEvent();
  112. };
  113.  
  114. #ifdef FW_BUILD_MAC
  115. //========================================================================================
  116. // CLASS FW_CMacWindowEvent
  117. //========================================================================================
  118.  
  119. class FW_CMacWindowEvent : public FW_CSystemEvent
  120. {
  121. public:
  122.     
  123.     FW_CMacWindowEvent(Environment* ev, ODEventData* theEvent, FW_Boolean propagated);
  124.     virtual        ~FW_CMacWindowEvent();
  125. };
  126. #endif
  127.  
  128. //========================================================================================
  129. // CLASS FW_CMouseEvent
  130. //========================================================================================
  131.  
  132. class FW_CMouseEvent : public FW_CSystemEvent
  133. {
  134. public:
  135.     
  136.     enum EButtonState
  137.     {
  138.         kMouseButtonDown, kMouseButtonUp
  139.     };
  140.  
  141.     enum EWhichButton
  142.     {
  143.         kLeftMouseButton, kMiddleMouseButton, kRightMouseButton
  144.     };
  145.  
  146.     enum ECoordinates
  147.     {
  148.         kScreen, kWindow, kFrame
  149.     };
  150.  
  151.     FW_CMouseEvent(Environment* ev, 
  152.                         ODEventData* theEvent, 
  153.                         ODFacet* theFacet, 
  154.                         EButtonState theState, 
  155.                         FW_Boolean propagated, 
  156.                         short numOfClicks = 1);
  157.     FW_CMouseEvent(Environment* ev, 
  158.                         ODFacet* theFacet,
  159.                         EButtonState theState,
  160.                         EWhichButton initialButton,
  161.                         ODPlatformWindow theWindow,
  162.                         FW_PlatformEventTime when,
  163.                         const FW_CPoint& where,
  164.                         unsigned short modifiers,
  165.                         short numOfClicks = 1);
  166.     FW_CMouseEvent(Environment* ev, const FW_CEmbeddedMouseEvent& embeddedEvent);
  167.     
  168.     FW_CMouseEvent(Environment* ev, const FW_CMouseEvent& other);
  169.     virtual        ~FW_CMouseEvent();
  170.     
  171.     
  172.     ODFacet*            GetFacet(Environment* ev) const;
  173.     EButtonState        GetButtonState(Environment* ev) const;
  174.     EWhichButton        GetInitialButtonPressed(Environment* ev) const;
  175.     short                GetNumberOfClicks(Environment* ev) const;
  176.  
  177.     // Position
  178.     FW_CPoint            GetLogicalMousePosition(Environment* ev, 
  179.                                         const FW_CMapping& mapping) const;
  180.     FW_CPoint            GetMousePosition(Environment* ev, 
  181.                                         ECoordinates coordinate) const;
  182.  
  183.     // Buttons Pressed
  184.     FW_Boolean            IsLeftButtonPressed(Environment* ev) const;
  185.     FW_Boolean            IsMiddleButtonPressed(Environment* ev) const;
  186.     FW_Boolean            IsRightButtonPressed(Environment* ev) const;
  187.     
  188.     // Utility
  189.     FW_Boolean            WaitUntilMouseMoved(Environment* ev) const;
  190.     
  191. protected:
  192.     ODFacet*             fFacet;
  193.     EButtonState         fButtonState;
  194.     EWhichButton         fWhichButton;
  195.     short                fNumberOfClicks;
  196. };
  197.  
  198. //========================================================================================
  199. // CLASS FW_CEmbeddedMouseEvent
  200. //========================================================================================
  201.  
  202. class FW_CEmbeddedMouseEvent : public FW_CMouseEvent
  203. {
  204. public:
  205.     
  206.     FW_CEmbeddedMouseEvent(Environment* ev, ODEventData* theEvent,
  207.                                             ODFacet* theFacet,
  208.                                             ODFrame* theEmbeddedFrame,
  209.                                             ODFacet* theEmbeddedFacet,
  210.                                             EButtonState theState,
  211.                                             FW_Boolean propagated,
  212.                                             short numOfClicks = 1);
  213.                                             
  214.     FW_CEmbeddedMouseEvent(Environment* ev, ODFacet* theFacet,
  215.                                             ODFrame* theEmbeddedFrame,
  216.                                             ODFacet* theEmbeddedFacet,
  217.                                             EButtonState theState,
  218.                                             EWhichButton initialButton,
  219.                                             ODPlatformWindow theWindow,
  220.                                             FW_PlatformEventTime when,
  221.                                             const FW_CPoint& where,
  222.                                             unsigned short modifiers,
  223.                                             short numOfClicks = 1);
  224.  
  225.     FW_CEmbeddedMouseEvent(Environment* ev, const FW_CEmbeddedMouseEvent& other);
  226.     virtual        ~FW_CEmbeddedMouseEvent();
  227.     
  228.     ODFrame*     GetEmbeddedFrame(Environment* ev) const;
  229.     ODFacet*     GetEmbeddedFacet(Environment* ev) const;
  230.  
  231. private:
  232.     ODFrame*     fEmbeddedFrame;
  233.     ODFacet*     fEmbeddedFacet;
  234. };
  235.  
  236. //========================================================================================
  237. // CLASS FW_CBorderMouseEvent
  238. //========================================================================================
  239.  
  240. class FW_CBorderMouseEvent : public FW_CMouseEvent
  241. {
  242. public:
  243.     
  244.     FW_CBorderMouseEvent(Environment* ev, ODEventData* theEvent,
  245.                                             ODFacet* theFacet,
  246.                                             ODFrame* theEmbeddedFrame,
  247.                                             ODFacet* theEmbeddedFacet,
  248.                                             EButtonState theState,
  249.                                             FW_Boolean propagated,
  250.                                             short numOfClicks = 1);
  251.                                             
  252.     FW_CBorderMouseEvent(Environment* ev, ODFacet* theFacet,
  253.                                             ODFrame* theEmbeddedFrame,
  254.                                             ODFacet* theEmbeddedFacet,
  255.                                             EButtonState theState,
  256.                                             EWhichButton initialButton,
  257.                                             ODPlatformWindow theWindow,
  258.                                             FW_PlatformEventTime when,
  259.                                             const FW_CPoint& where,
  260.                                             unsigned short modifiers,
  261.                                             short numOfClicks = 1);
  262.                                             
  263.     FW_CBorderMouseEvent(Environment* ev, const FW_CBorderMouseEvent& other);
  264.     virtual        ~FW_CBorderMouseEvent();
  265.  
  266.     ODFrame*     GetEmbeddedFrame(Environment* ev) const;
  267.     ODFacet*     GetEmbeddedFacet(Environment* ev) const;
  268.  
  269. private:
  270.     ODFrame*     fEmbeddedFrame;
  271.     ODFacet*     fEmbeddedFacet;
  272. };
  273.  
  274. //========================================================================================
  275. // CLASS FW_CVirtualKeyEvent
  276. //========================================================================================
  277.  
  278. class FW_CVirtualKeyEvent : public FW_CSystemEvent
  279. {
  280. public:
  281.     
  282.     enum KeyboardState
  283.     {
  284.         kKeyDown, kKeyUp
  285.     };
  286.     
  287.     FW_CVirtualKeyEvent(Environment* ev, 
  288.                         ODEventData* theEvent, 
  289.                         KeyboardState theKeyboardState, 
  290.                         FW_Boolean propagated,
  291.                         unsigned short repeatCount = 0);
  292.     FW_CVirtualKeyEvent(Environment* ev, 
  293.                         KeyboardState theKeyboardState,
  294.                         short keyCode,
  295.                         ODPlatformWindow theWindow,
  296.                         FW_PlatformEventTime when,
  297.                         unsigned short repeatCount = 0);
  298.  
  299.     FW_CVirtualKeyEvent(Environment* ev, const FW_CVirtualKeyEvent& other);
  300.     virtual~ FW_CVirtualKeyEvent();
  301.     
  302.     KeyboardState    GetKeyboardState(Environment* ev) const;
  303.     FW_Boolean         IsRepeating(Environment* ev) const;
  304.     unsigned short     GetRepeatCount(Environment* ev) const;
  305.     short             GetKeyCode(Environment* ev) const;
  306.     FW_Boolean         IsCommandPeriod(Environment* ev) const;
  307.     
  308. private:
  309.     KeyboardState     fKeyboardState;
  310.     unsigned short     fRepeatCount;
  311. };
  312.  
  313.  
  314. //========================================================================================
  315. // CLASS FW_CCharKeyEvent
  316. //========================================================================================
  317.  
  318. class FW_CCharKeyEvent : public FW_CSystemEvent
  319. {
  320. public:
  321.     
  322.     FW_CCharKeyEvent(Environment* ev, 
  323.                     ODEventData* theEvent, 
  324.                     FW_Boolean propagated,
  325.                     unsigned short repeatCount = 0);
  326.     FW_CCharKeyEvent(Environment* ev, 
  327.                     char keyChar,
  328.                     ODPlatformWindow theWindow,
  329.                     FW_PlatformEventTime when,
  330.                     unsigned short repeatCount = 0);
  331.  
  332.     FW_CCharKeyEvent(Environment* ev, const FW_CCharKeyEvent& other);
  333.     virtual~ FW_CCharKeyEvent();
  334.  
  335.     FW_Boolean         IsRepeating(Environment* ev) const;
  336.     unsigned short     GetRepeatCount(Environment* ev) const;
  337.     char            GetChar(Environment* ev) const;
  338.     
  339. private:
  340.     unsigned short fRepeatCount;
  341. };
  342.  
  343. //========================================================================================
  344. // CLASS FW_CSuspendResumeEvent
  345. //========================================================================================
  346.  
  347. class FW_CSuspendResumeEvent : public FW_CSystemEvent
  348. {
  349. public:
  350.     
  351.     FW_CSuspendResumeEvent(Environment* ev, 
  352.                             ODEventData* theEvent, 
  353.                             ODFacet* facet, 
  354.                             FW_Boolean isGoingToBackground,
  355.                             FW_Boolean propagated);
  356.     FW_CSuspendResumeEvent(Environment* ev, 
  357.                             const FW_CSuspendResumeEvent& other);
  358.     virtual~ FW_CSuspendResumeEvent();
  359.     
  360.     FW_Boolean         IsGoingToBackground(Environment* ev) const;
  361.     ODFacet*         GetFacet(Environment* ev) const;
  362.     
  363. private:
  364.     FW_Boolean         fIsGoingToBackground;
  365.     ODFacet*        fFacet;
  366. };
  367.  
  368. //========================================================================================
  369. // CLASS FW_CActivateEvent
  370. //========================================================================================
  371.  
  372. class FW_CActivateEvent : public FW_CSystemEvent
  373. {
  374. public:
  375.     
  376.     FW_CActivateEvent(Environment* ev, 
  377.                     ODEventData* theEvent, 
  378.                     ODFacet* facet, 
  379.                     FW_Boolean theState,
  380.                     FW_Boolean propagated);
  381.     FW_CActivateEvent(Environment* ev, 
  382.                     ODFacet* facet,
  383.                     FW_Boolean theState,
  384.                     ODPlatformWindow theWindow,
  385.                     FW_PlatformEventTime when);
  386.  
  387.     FW_CActivateEvent(Environment* ev, const FW_CActivateEvent& other);
  388.     virtual~ FW_CActivateEvent();
  389.     
  390.     FW_Boolean                     IsActivating(Environment* ev) const;
  391.     ODFacet*                     GetFacet(Environment* ev) const;
  392.     
  393. private:
  394.     FW_Boolean         fActivationState;
  395.     ODFacet*        fFacet;
  396. };
  397.  
  398. //========================================================================================
  399. // CLASS FW_CMenuEvent
  400. //========================================================================================
  401.  
  402. class FW_CMenuEvent : public FW_CSystemEvent
  403. {
  404. public:
  405.     
  406.     FW_CMenuEvent(Environment* ev, 
  407.                     ODEventData* theEvent, 
  408.                     ODCommandID theCommandID,
  409.                     FW_Boolean propagated);
  410.     FW_CMenuEvent(Environment* ev, 
  411.                     ODCommandID theCommandID,
  412.                     ODPlatformWindow theWindow,
  413.                     FW_PlatformEventTime when);
  414.  
  415.     FW_CMenuEvent(Environment* ev, const FW_CMenuEvent& other);
  416.     virtual~ FW_CMenuEvent();
  417.     
  418.     ODCommandID GetCommandID(Environment* ev) const;
  419.     
  420. private:
  421.     ODCommandID fCommandID;
  422. };
  423.  
  424. //========================================================================================
  425. // inlines
  426. //========================================================================================
  427.  
  428. //----------------------------------------------------------------------------------------
  429. //    FW_CSystemEvent::GetPlatformEvent
  430. //----------------------------------------------------------------------------------------
  431. inline ODEventData* FW_CSystemEvent::GetPlatformEvent()
  432. {
  433.     return &fEvent;
  434. }
  435.  
  436. //----------------------------------------------------------------------------------------
  437. //    FW_CSystemEvent::GetMessage
  438. //----------------------------------------------------------------------------------------
  439. inline unsigned long FW_CSystemEvent::GetMessage() const
  440. {
  441.     return fEvent.message;
  442. }
  443.  
  444. //----------------------------------------------------------------------------------------
  445. //    FW_CSystemEvent::GetTime
  446. //----------------------------------------------------------------------------------------
  447. inline FW_PlatformEventTime FW_CSystemEvent::GetTime() const
  448. {
  449. #ifdef FW_BUILD_MAC
  450.     return fEvent.when;
  451. #endif
  452. #ifdef FW_BUILD_WIN
  453.     return fEvent.time;
  454. #endif
  455. }
  456.  
  457. //----------------------------------------------------------------------------------------
  458. //    FW_CSystemEvent::GetPlatformModifiers
  459. //----------------------------------------------------------------------------------------
  460. inline unsigned long FW_CSystemEvent::GetPlatformModifiers(Environment*) const
  461. {
  462. #ifdef FW_BUILD_MAC
  463.     return fEvent.modifiers;
  464. #endif
  465. #ifdef FW_BUILD_WIN
  466.     return fEvent.wParam;
  467. #endif
  468. }
  469.  
  470. //----------------------------------------------------------------------------------------
  471. //    FW_CSystemEvent::GetPlatformWindow
  472. //----------------------------------------------------------------------------------------
  473. inline ODPlatformWindow FW_CSystemEvent::GetPlatformWindow() const
  474. {
  475.     return fPlatformWindow;
  476. }
  477.  
  478. //----------------------------------------------------------------------------------------
  479. //    FW_CSystemEvent::IsCopyModifier
  480. //----------------------------------------------------------------------------------------
  481. inline FW_Boolean FW_CSystemEvent::IsCopyModifier(Environment*) const
  482. {
  483. #ifdef FW_BUILD_MAC
  484.     return (fEvent.modifiers & optionKey) != 0;
  485. #endif
  486. #ifdef FW_BUILD_WIN
  487.     return (fEvent.wParam & MK_CONTROL) != 0;
  488. #endif
  489. }
  490.  
  491. //----------------------------------------------------------------------------------------
  492. //    FW_CSystemEvent::IsControlKeyModifier
  493. //----------------------------------------------------------------------------------------
  494. inline FW_Boolean FW_CSystemEvent::IsControlKeyModifier(Environment*) const
  495. {
  496. #ifdef FW_BUILD_MAC
  497.     return (fEvent.modifiers & controlKey) != 0;
  498. #endif
  499. #ifdef FW_BUILD_WIN
  500.     return (fEvent.wParam & MK_CONTROL) != 0;
  501. #endif
  502. }
  503.  
  504. //----------------------------------------------------------------------------------------
  505. //    FW_CSystemEvent::IsExtendModifier
  506. //----------------------------------------------------------------------------------------
  507. inline FW_Boolean FW_CSystemEvent::IsExtendModifier(Environment*) const
  508. {
  509. #ifdef FW_BUILD_MAC
  510.     return (fEvent.modifiers & shiftKey) != 0;
  511. #endif
  512. #ifdef FW_BUILD_WIN
  513.     return (fEvent.wParam & MK_SHIFT) != 0;
  514. #endif
  515. }
  516.  
  517. //----------------------------------------------------------------------------------------
  518. //    FW_CSystemEvent::IsItemModifier
  519. //----------------------------------------------------------------------------------------
  520. inline FW_Boolean FW_CSystemEvent::IsItemModifier(Environment*) const
  521. {
  522. #ifdef FW_BUILD_MAC
  523.     return (fEvent.modifiers & cmdKey) != 0;
  524. #endif
  525. #ifdef FW_BUILD_WIN
  526.     return (fEvent.wParam & MK_CONTROL) != 0;
  527. #endif
  528. }
  529.  
  530. //----------------------------------------------------------------------------------------
  531. //    FW_CSystemEvent::ClearExtendModifier
  532. //----------------------------------------------------------------------------------------
  533. inline void FW_CSystemEvent::ClearExtendModifier(Environment*)
  534. {
  535. #ifdef FW_BUILD_MAC
  536.     fEvent.modifiers -= shiftKey;
  537. #endif
  538. #ifdef FW_BUILD_WIN
  539.     fEvent.wParam -= MK_SHIFT;
  540. #endif
  541. }
  542.  
  543. //----------------------------------------------------------------------------------------
  544. //    FW_CSystemEvent::ClearItemModifier
  545. //----------------------------------------------------------------------------------------
  546. inline void FW_CSystemEvent::ClearItemModifier(Environment*)
  547. {
  548. #ifdef FW_BUILD_MAC
  549.     fEvent.modifiers -= cmdKey;
  550. #endif
  551. #ifdef FW_BUILD_WIN
  552.     fEvent.wParam -= MK_CONTROL;
  553. #endif
  554. }
  555.  
  556. //----------------------------------------------------------------------------------------
  557. //    FW_CSystemEvent::ClearCopyModifier
  558. //----------------------------------------------------------------------------------------
  559. inline void FW_CSystemEvent::ClearCopyModifier(Environment*)
  560. {
  561. #ifdef FW_BUILD_MAC
  562.     fEvent.modifiers -= optionKey;
  563. #endif
  564. #ifdef FW_BUILD_WIN
  565.     fEvent.wParam -= MK_CONTROL;
  566. #endif
  567. }
  568.  
  569. //----------------------------------------------------------------------------------------
  570. //    FW_CSystemEvent::ClearControlKeyModifier
  571. //----------------------------------------------------------------------------------------
  572. inline void FW_CSystemEvent::ClearControlKeyModifier(Environment*)
  573. {
  574. #ifdef FW_BUILD_MAC
  575.     fEvent.modifiers -= controlKey;
  576. #endif
  577. #ifdef FW_BUILD_WIN
  578.     fEvent.wParam -= MK_CONTROL;
  579. #endif
  580. }
  581.  
  582. //----------------------------------------------------------------------------------------
  583. //    FW_CMouseEvent::GetFacet
  584. //----------------------------------------------------------------------------------------
  585. inline ODFacet* FW_CMouseEvent::GetFacet(Environment*) const
  586. {
  587.     return fFacet;
  588. }
  589.  
  590. //----------------------------------------------------------------------------------------
  591. //    FW_CMouseEvent::GetButtonState
  592. //----------------------------------------------------------------------------------------
  593. inline FW_CMouseEvent::EButtonState FW_CMouseEvent::GetButtonState(Environment*) const
  594. {
  595.     return fButtonState;
  596. }
  597.  
  598. //----------------------------------------------------------------------------------------
  599. //    FW_CMouseEvent::GetInitialButtonPressed
  600. //----------------------------------------------------------------------------------------
  601. inline FW_CMouseEvent::EWhichButton FW_CMouseEvent::GetInitialButtonPressed(Environment*) const
  602. {
  603.     return fWhichButton;
  604. }
  605.  
  606. //----------------------------------------------------------------------------------------
  607. //    FW_CMouseEvent::GetNumberOfClicks
  608. //----------------------------------------------------------------------------------------
  609. inline short FW_CMouseEvent::GetNumberOfClicks(Environment*) const
  610. {
  611.     return fNumberOfClicks;
  612. }
  613.  
  614. //----------------------------------------------------------------------------------------
  615. //    FW_CVirtualKeyEvent::GetKeyboardState
  616. //----------------------------------------------------------------------------------------
  617. inline FW_CVirtualKeyEvent::KeyboardState FW_CVirtualKeyEvent::GetKeyboardState(Environment*) const
  618. {
  619.     return fKeyboardState;
  620. }
  621.  
  622. //----------------------------------------------------------------------------------------
  623. //    FW_CVirtualKeyEvent::IsRepeating
  624. //----------------------------------------------------------------------------------------
  625. inline FW_Boolean FW_CVirtualKeyEvent::IsRepeating(Environment*) const
  626. {
  627.     return (fRepeatCount > 0);
  628. }
  629.  
  630. //----------------------------------------------------------------------------------------
  631. //    FW_CVirtualKeyEvent::GetRepeatCount
  632. //----------------------------------------------------------------------------------------
  633. inline unsigned short FW_CVirtualKeyEvent::GetRepeatCount(Environment*) const
  634. {
  635.     return fRepeatCount;
  636. }
  637.  
  638. //----------------------------------------------------------------------------------------
  639. //    FW_CCharKeyEvent::IsRepeating
  640. //----------------------------------------------------------------------------------------
  641. inline FW_Boolean FW_CCharKeyEvent::IsRepeating(Environment*) const
  642. {
  643.     return (fRepeatCount > 0);
  644. }
  645.  
  646. //----------------------------------------------------------------------------------------
  647. //    FW_CCharKeyEvent::GetRepeatCount
  648. //----------------------------------------------------------------------------------------
  649. inline unsigned short FW_CCharKeyEvent::GetRepeatCount(Environment*) const
  650. {
  651.     return fRepeatCount;
  652. }
  653.  
  654. //----------------------------------------------------------------------------------------
  655. //    FW_CActivateEvent::IsActivating
  656. //----------------------------------------------------------------------------------------
  657. inline FW_Boolean FW_CActivateEvent::IsActivating(Environment*) const
  658. {
  659.     return fActivationState;
  660. }
  661.  
  662. //----------------------------------------------------------------------------------------
  663. //    FW_CActivateEvent::GetFacet
  664. //----------------------------------------------------------------------------------------
  665. inline ODFacet* FW_CActivateEvent::GetFacet(Environment*) const
  666. {
  667.     return fFacet;
  668. }
  669.  
  670. //----------------------------------------------------------------------------------------
  671. //    FW_CSuspendResumeEvent::IsGoingToBackground
  672. //----------------------------------------------------------------------------------------
  673. inline FW_Boolean FW_CSuspendResumeEvent::IsGoingToBackground(Environment*) const
  674. {
  675.     return fIsGoingToBackground;
  676. }
  677.  
  678. //----------------------------------------------------------------------------------------
  679. //    FW_CSuspendResumeEvent::GetFacet
  680. //----------------------------------------------------------------------------------------
  681. inline ODFacet* FW_CSuspendResumeEvent::GetFacet(Environment*) const
  682. {
  683.     return fFacet;
  684. }
  685.  
  686. //----------------------------------------------------------------------------------------
  687. //    FW_CMenuEvent::GetCommandID
  688. //----------------------------------------------------------------------------------------
  689. inline ODCommandID FW_CMenuEvent::GetCommandID(Environment*) const
  690. {
  691.     return fCommandID;
  692. }
  693.  
  694. //----------------------------------------------------------------------------------------
  695. //    FW_CSystemEvent::IsPropagated
  696. //----------------------------------------------------------------------------------------
  697. inline FW_Boolean FW_CSystemEvent::IsPropagated(Environment*) const
  698. {
  699.     return fPropagated;
  700. }
  701.  
  702. #endif
  703.  
  704.  
  705.